package com.syg.controller;

import com.syg.dataobj.request.SerializableRequest;
import com.syg.dataobj.response.SerializableResponse;
import com.syg.util.BeanUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ps
 */
@RestController
public class SerializableController {

    @PostMapping("/serial")
    public SerializableResponse testJsonAlias(@RequestBody SerializableRequest request) {
        return BeanUtil.copyProperties(request, SerializableResponse.class);
    }

}
